#!/usr/bin/python
# coding:utf-8
import logging


class Config(object):
    """项目配置信息"""

    SQLALCHEMY_DATABASE_URI = "mysql://root:123456@127.0.0.1:3306/poke_game"  # mysql配置项
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    REDIS_HOST = "127.0.0.1"  # redis配置项
    REDIS_PORT = 6379

    SECRET_KEY = "zhangliang"  # session配置项

    SESSION_TYPE = "redis"  # 配置session
    SESSION_USE_SIGNER = True


class DevelopMode(Config):
    """开发者模式, 开启debug模式,log级别为warn"""

    DEBUG = True
    LOG_LEVEL = logging.DEBUG


class ProductMode(Config):
    """生产模式, 关闭debug模式, log级别为error"""

    DEBUG = False
    LOG_LEVEL = logging.ERROR
